<template>
  <el-button type="primary" @click="loginIn">登录</el-button>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();

const loginIn = () => {
  localStorage.setItem("token", "123456789");
  localStorage.setItem(
    "expiresIn",
    String(Date.now() + 30 * 24 * 60 * 60 * 1000)
  );
  router.push("/");
};
</script>
